import 'package:flutter/material.dart';
import 'package:memo/widget/my_avatar_widget.dart';

class MyDrawerPage extends StatelessWidget {
  const MyDrawerPage({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
      child: Container(
        child: Column(
          children: <Widget>[
            const SizedBox(height: 50.0),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                MyAvatarWidget(imgPath: "assets/image/avatar.jpeg"),
              ],
            ),
            const SizedBox(height: 30.0),
            ListTile(
              leading: Icon(Icons.assistant_photo),
              title: Text("打卡记录"),
              onTap: () => Navigator.of(context).pushNamed("/workRecordListPage"),
            ),
            ListTile(
              leading: Icon(Icons.history),
              title: Text("历史待办"),
              onTap: () => Navigator.of(context).pushNamed("/historyTodoListPage"),
            ),
            ListTile(
              leading: Icon(Icons.settings),
              title: Text("设置"),
              onTap: () => Navigator.of(context).pushNamed("/settingPage"),
            ),
          ],
        ),
      ),
    );
  }
}
